<template>
  <div class="money">
    <div class="money-item">
      <div class="money-title">如何才能赚钱？</div>
      <div class="money-body">
        <div class="money-body-title">
          {{prices.title}}
        </div>
        <div class="money-body-content">
          {{prices.data}}
        </div>
      </div>
    </div>
    <public-menu></public-menu>
  </div>
</template>

<script>
import axios from 'axios'
import PublicMenu from '../public/Menu'
export default {
  name: 'HomeMoney',
  data () {
    return {
      prices: {}
    }
  },
  components: {
    PublicMenu
  },
  methods: {
    getInfo () {
      axios.get('/meimai/interface/config/getCourse').then((res) => {
        let datas = res.data
        if (datas.code === 0) {
          this.prices = datas
          console.log(datas)
        }
      })
    }
  },
  mounted () {
    this.getInfo()
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/mixins.styl'
.money
  font-family: "Microsoft YaHei"
  position: absolute
  left: 0
  right: 0
  top: 0
  bottom: .98rem
  background: #f3f3f3
  .money-item
    background: #fff
    padding: .3rem .2rem
    .money-title
      font-size: .32rem
      color: #ff9600
      font-weight: 700
      background: url(/static/icon/integral.png) left center no-repeat
      background-size: .4rem
      line-height: .4rem
      padding-left: .46rem
    .money-body
      margin: .3rem 0
      .money-body-title
        font-size: .36rem
        text-align: center
        line-height: .6rem
        font-weight: 700
        margin-bottom: .2rem
        ellipsis()
      .money-body-content
        font-size: .28rem
        line-height: .49rem
        margin-bottom: .2rem
      .text-right
        font-size: .24rem
        color: #ccc
</style>
